﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
 Inherits="System.Web.Mvc.ViewPage<IntellectShop.Web2.Hardware.ViewModels.TagsViewModel>" %>
<%@ Import Namespace="IntellectShop.Web2.Hardware.Code" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Html.Resource("Index") %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

	<h1><%= Html.Resource("TagsIndex") %></h1>

<% if (Model.SingleTags.Count() > 0)
	{ %>
	<table class="hovered">
		<tr>
			<th>
				<%= Html.LabelFor(model => model.SingleTags.First().Tag) %>
			</th>
			<th>
				<%= Html.LabelFor(model => model.SingleTags.First().SortingID) %>
			</th>
			<th>
				<%= Html.Resource("Action") %>
			</th>
		</tr>
		<% foreach (var item in Model.SingleTags)
		{ %>
		<tr>
			<td>
				<%= Html.Encode(item.Tag) %>
			</td>
			<td>
				<%= Html.Encode(item.SortingID) %>
			</td>
			<td>
				<%= Html.ActionLink(Html.Resource("Browse"), "Browse", "Tags", new { tag = item.Tag }, null)%>
				 | 
				<%= Html.ActionLink(Html.Resource("Edit"), "Edit", new { tag=item.Tag })%>
				 | 
				<%= Html.ActionLink(Html.Resource("Delete"), "Delete", new { tag=item.Tag})%>
			</td>
		</tr>
		<% } %>
	</table>
<% } %>

</asp:Content>
